package org.tulkas.ext;

import java.util.HashMap;
import java.util.Map;

/**
 * @author <a href="mailto:tulkas.web@gmail.com">Tulkas</a>
 *
 */
public class Plugin {
	private String id;
	private String name;
	private String description;
	private String icon;
	private String provider;
	private String version;
	private final Map<String, String> dependencies = new HashMap<String, String>();
	private ConfigExtension[] configExtensions = null;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getProvider() {
		return provider;
	}

	public void setProvider(String provider) {
		this.provider = provider;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public ConfigExtension[] getConfigExtensions() {
		return configExtensions;
	}

	public void setConfigExtensions(ConfigExtension[] configExtensions) {
		this.configExtensions = configExtensions;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void addDependency(String id, String version) {
		dependencies.put(id, version);
	}

	public void clearDependencies() {
		dependencies.clear();
	}

	public String[] getDependencyIds() {
		return dependencies.keySet().toArray(new String[dependencies.size()]);
	}

	public String getDependencyVersion(String id) {
		return dependencies.get(id);
	}

}
